How to remove the last comma in javascript